package com.linkhub.oms.common.exception;

import com.linkhub.oms.common.enums.ResponseCodeEnum;

/**
 * @Description: ResponseCode
 * @Author: echo
 * @Date: 2024/3/2 22:29
 * @Version: 1.0
 */
public class BizException extends BaseException {


    private static final long serialVersionUID = 1L;
    private Object data;

    public BizException(String errMessage) {
        super(ResponseCodeEnum.SERVICE_ERROR, errMessage);
    }

    public BizException(ResponseCodeEnum resultCodeEnum) {
        super(resultCodeEnum);
    }

    public BizException(ResponseCodeEnum resultCodeEnum, String errMessage) {
        super(resultCodeEnum, errMessage);
    }

    public BizException(String errCode, String errMessage) {
        super(errCode, errMessage);
    }

    public BizException(String errMessage, Throwable e) {
        super(ResponseCodeEnum.SERVICE_ERROR.getCode(), errMessage, e);
    }

    public BizException(String errorCode, String errMessage, Throwable e) {
        super(errorCode, errMessage, e);
    }

    public BizException(String errCode, String errMessage, Object data) {
        super(errCode, errMessage);
        this.data = data;
    }

    public Object getData() {
        return this.data;
    }

}